BEGIN;
	CREATE FUNCTION compare_arrays_normalize(anyarray,anyarray) RETURNS NUMERIC AS $$
		SELECT 2.0*count(*)/(array_length($1,1)+array_length($2,1)) FROM (SELECT unnest($1) INTERSECT SELECT unnest($2)) AS tmp
	$$ LANGUAGE sql;
END;
